]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
search: Don't run a full search for equal terms
authorJasper St. Pierre <jstpierre@mecheye.net>
Sat, 16 Feb 2013 04:15:13 +0000 (23:15 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sat, 16 Feb 2013 18:24:21 +0000 (13:24 -0500)
Due to the timeout on the search entry, it's possible for
a very quick edit to the entry to launch a subsearch on the
same search string.

https://bugzilla.gnome.org/show_bug.cgi?id=693937

js/ui/search.js

index c4eb10c2439d7d1c8d8670bcf08049bbaac82045..3dd59d720bb1e036a5477655b7c723af2397517a 100644 (file)
@@ -66,6 +66,8 @@ const SearchSystem = new Lang.Class({
 
         let searchString = terms.join(' ');
         let previousSearchString = this._previousTerms.join(' ');
+        if (searchString == previousSearchString)
+            return;
 
         let isSubSearch = false;
         if (this._previousTerms.length > 0)